package com.dd.cloud.user.req.chknowl;

import com.dd.cloud.common.annotate.FileSuffix;
import com.dd.cloud.common.annotate.validation.Desc;
import com.dd.cloud.common.annotate.validation.Name;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author zk
 */
@Data
public class ChPatentUpdateReq{

    /**
     * id
     */
    @NotNull(message = "中成药id不能为空")
    private Integer id;

    /**
     * 中成药名称
     */
    @NotBlank(message = "中成药名称不能为空")
    @Name(begin = "中成药名称")
    private String name;

    /**
     * 处方
     */
    @Length(max = 512, message = "处方长度最大为512个字符")
    private String pres;

    /**
     * 功能主治
     */
    @Length(max = 512, message = "功能与主治长度最大为512个字符")
    private String indications;

    /**
     * 用法用量
     */
    @Length(max = 200, message = "用法用量长度最大为200个字符")
    private String dosage;

    /**
     * 性状
     */
    @Desc(required = false, begin = "性状")
    @Length(max = 512, message = "性状长度最大为512个字符")
    private String properties;

    /**
     * 注意事项
     */
    @Length(max = 512, message = "注意事项长度最大为512个字符")
    private String precautions;

    /**
     * 规格
     */
    @Length(max = 150, message = "规格长度最大为150个字符")
    private String specs;

    /**
     * 科室
     */
    @NotBlank(message = "科室不能为空")
    @Name(required = false, begin = "科室")
    private String department;

    /**
     * 图片地址
     */
    @FileSuffix(head = false)
    private String imgUrl;

    /**
     * 贮藏
     */
    @Length(max = 150, message = "贮藏长度最大为150个字符")
    private String depot;

    /**
     * 产地
     */
    @Name(required = false, begin = "产地")
    private String orgin;

    /**
     * 状态
     */
    @NotNull(message = "状态不能为空")
    private Integer status;
}
